package jjn.acwing;

import java.util.Scanner;

/**
 * @author Jiang Jining
 * @since 2023-09-10 16:46
 */
public class Acwing775 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            String line = sc.nextLine();
            String[] parts = line.split(" ");
            StringBuilder s = new StringBuilder();
            for (int i = parts.length - 1; i >= 0; i--) {
                s.append(parts[i]);
                s.append(" ");
            }
            System.out.println(s);
        }
    }
}
